package com.wjs.spring.bean;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

//切面 = 切点+通知
@Component
@Aspect
//@Order(2)
public class StudentAspect {
    @Before("execution(* com.wjs.spring.bean.Service.*(..))")
    public void studyMybatis(){
        System.out.println("先学习mybatis");
    }

    @AfterReturning("execution(* com.wjs.spring.bean.Service.*(..))")
    public void studySpringMvc(){
        System.out.println("最后学习SpringMvc");
    }
}
